﻿<sap:ActivityDesigner x:Class="Neovolve.Toolkit.Workflow.Design.Presentation.ReceiveIdentityInspectorDesigner"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
                      xmlns:Activities="clr-namespace:System.ServiceModel.Activities;assembly=System.ServiceModel.Activities">
	<sap:ActivityDesigner.Icon>
		<DrawingBrush>
			<DrawingBrush.Drawing>
				<ImageDrawing>
					<ImageDrawing.Rect>
						<Rect Location="0,0"
						      Size="16,16">
						</Rect>
					</ImageDrawing.Rect>
					<ImageDrawing.ImageSource>
						<BitmapImage UriSource="user.png"></BitmapImage>
					</ImageDrawing.ImageSource>
				</ImageDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
	</sap:ActivityDesigner.Icon>
	<sap:ActivityDesigner.Resources>
		<DataTemplate x:Key="Collapsed">
			<TextBlock HorizontalAlignment="Center"
			           FontStyle="Italic"
			           Foreground="Gray">
				Double-click to view
			</TextBlock>
		</DataTemplate>
		<DataTemplate x:Key="Expanded">
			<sap:WorkflowItemPresenter AllowedItemType="{x:Type Activities:Receive}"
			                           Item="{Binding ModelItem.Body}"
			                           HintText="Drop activity"
			                           Margin="6" />
		</DataTemplate>
		<Style x:Key="ExpandOrCollapsedStyle"
		       TargetType="{x:Type ContentPresenter}">
			<Setter Property="ContentTemplate"
			        Value="{DynamicResource Collapsed}" />
			<Style.Triggers>
				<DataTrigger Binding="{Binding Path=ShowExpanded}"
				             Value="true">
					<Setter Property="ContentTemplate"
					        Value="{DynamicResource Expanded}" />
				</DataTrigger>
			</Style.Triggers>
		</Style>
	</sap:ActivityDesigner.Resources>
	<Grid>
		<ContentPresenter Style="{DynamicResource ExpandOrCollapsedStyle}"
		                  Content="{Binding}" />
	</Grid>
</sap:ActivityDesigner>